package com.nft.service.school.feign;

import com.nft.service.school.req.BookReq;
import com.nft.service.school.resp.BookResp;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(value = "nft-service-school",contextId="bookClient", path = "/bookClient")
public interface IBookClient {
    @RequestMapping(value = "/list", method = RequestMethod.GET)
    public List<BookResp> getList(@RequestParam("type") String type, @RequestParam("keywords") String keywords);

    @RequestMapping(value = "/put", method = RequestMethod.POST)
    public Boolean putBook(@RequestParam("type") String type, @RequestParam("key") String key, @RequestParam String value, @RequestBody List<String> columns);

    @RequestMapping(value = "/get", method = RequestMethod.POST)
    public Boolean getBook(@RequestBody BookReq query);

    @RequestMapping(value = "/del", method = RequestMethod.POST)
    public Boolean delBook(@RequestBody BookReq query);

    @RequestMapping(value = "/match", method = RequestMethod.POST)
    public Boolean matchBook(@RequestBody BookReq query);
}
